<template>
  <el-dialog title="学工处填写" :visible.sync="dialogTableVisible" width="80%" @open="openDialog()">
    <el-form ref="form" :model="form" label-width="120px">
      <el-row>
        <el-col :span="12">
          <div class="grid-content bg-purple">
            <el-form-item label="姓名">
              <el-input v-model="form.xm"  disabled></el-input>
            </el-form-item>
            <el-form-item label="身份证号">
              <el-input :value="form.zjhm" disabled></el-input>
            </el-form-item>
            <el-form-item label="出生日期">
              <el-input :value="form.csrq" disabled></el-input>
            </el-form-item>
          </div>
          <el-form-item label="通讯地址">
            <el-input :value="form.txdz" disabled></el-input>
          </el-form-item>
          <el-form-item label="邮政编码">
            <el-input :value="form.yzbm" disabled></el-input>
          </el-form-item>
          <el-form-item label="收件人">
            <el-input :value="form.sjr" disabled></el-input>
          </el-form-item>
          <el-form-item label="高考成绩">
            <el-input :value="form.gkcjx82" disabled></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <div class="grid-content bg-purple-light">
            <el-form-item label="考生号">
              <el-input :value="form.ksh" disabled></el-input>
            </el-form-item>
            <el-form-item label="性别">
              <el-input :value="form.xbdm==1?'男':'女'" disabled></el-input>
            </el-form-item>
            <el-form-item label="录取专业">
              <el-input :value="form.zydh1" disabled></el-input>
            </el-form-item>
            <el-form-item label="报考学校代码">
              <el-input :value="form.byxxdm" disabled></el-input>
            </el-form-item>
            <el-form-item label="报考学校名称">
              <el-input :value="form.byxxmc" disabled></el-input>
            </el-form-item>
            <el-form-item label="联系手机">
              <el-input :value="form.lxsj" disabled></el-input>
            </el-form-item>
            <el-form-item label="联系电话">
              <el-input :value="form.lxdh" disabled></el-input>
            </el-form-item>
          </div>
        </el-col>
      </el-row>




      <el-form-item>
        <el-button type="primary" @click="onSubmit">立即创建</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </el-dialog>
</template>

<script>
export default {
  name: "XgcDialog",
  props:{
    //遮罩层
    isOpen:{
      type: Boolean,
      default:false,
    },
    id:{
      type:Number,
      default: null
    }
  },
  data() {
    return {

      form: {
        id: null,
        ksh: null,
        xm: null,
        xbdm: null,
        csrq: null,
        byxxdm: null,
        byxxmc: null,
        zjhm: null,
        txdz: null,
        yzbm: null,
        lxsj: null,
        lxdh: null,
        sjr: null,
        gkcjx82: null,
        zydh1: null,
        status: null,
        opertman: null,
        zsbTime: null,
        ejxyTime: null,
        cwcTime: null,
        xgcTime: null,
        hqcTime: null
      }
    }
  },
  computed: {
    dialogTableVisible: {
      get() {
        return this.isOpen
      },
      set(val) {
        this.$emit('update:isOpen', val)
      },
    },
  },
  methods: {
    onSubmit() {
      this.$axios({
        method: 'post',
        url: this.$httpUrl + '/registrationProcess/registration3',
        data: this.form
      })
    },
    openDialog() {
      this.reset()
      this.$axios({
        method: 'get',
        url: this.$httpUrl + '/registrationProcess/getXgcInfoById/' + this.id,
      }).then(res=>{
        this.form = res.data.data
      })
    },
    reset(){
      this.form ={
        id: null,
        ksh: null,
        xm: null,
        xbdm: null,
        csrq: null,
        byxxdm: null,
        byxxmc: null,
        zjhm: null,
        txdz: null,
        yzbm: null,
        lxsj: null,
        lxdh: null,
        sjr: null,
        gkcjx82: null,
        zydh1: null,
        status: null,
        opertman: null,
        zsbTime: null,
        ejxyTime: null,
        cwcTime: null,
        xgcTime: null,
        hqcTime: null
      }
    },
  }
}
</script>

<style scoped>

</style>